<template>
	<view class="client-home">
		<!-- 顶部欢迎区域 -->
		<view class="header-section">
			<text class="welcome-text">欢迎使用客户服务系统</text>
			<text class="subtitle">为您提供高效便捷的服务支持</text>
		</view>
		
		<!-- 核心功能卡片 -->
		<view class="features-section">
			<view class="feature-card" @click="goToCreateTicket">
				<view class="card-icon primary">
					<text class="icon">📝</text>
				</view>
				<view class="card-content">
					<text class="card-title">提交工单</text>
					<text class="card-desc">遇到问题？立即提交工单获得帮助</text>
				</view>
				<view class="card-arrow">
					<text class="arrow">›</text>
				</view>
			</view>
			
			<view class="feature-card" @click="goToMyTickets">
				<view class="card-icon secondary">
					<text class="icon">📋</text>
				</view>
				<view class="card-content">
					<text class="card-title">我的工单</text>
					<text class="card-desc">查看和跟踪您的工单处理进度</text>
				</view>
				<view class="card-arrow">
					<text class="arrow">›</text>
				</view>
			</view>
		</view>
		
		<!-- 快捷操作区域 -->
		<view class="quick-actions">
			<view class="section-title">
				<text>快捷操作</text>
			</view>
			<view class="actions-grid">
				<view class="action-item" @click="contactService">
					<view class="action-icon">
						<text class="icon">💬</text>
					</view>
					<text class="action-text">联系客服</text>
				</view>
				<view class="action-item" @click="viewFAQ">
					<view class="action-icon">
						<text class="icon">❓</text>
					</view>
					<text class="action-text">常见问题</text>
				</view>
				<view class="action-item" @click="serviceGuide">
					<view class="action-icon">
						<text class="icon">📖</text>
					</view>
					<text class="action-text">服务指南</text>
				</view>
				<view class="action-item" @click="feedback">
					<view class="action-icon">
						<text class="icon">👍</text>
					</view>
					<text class="action-text">意见反馈</text>
				</view>
			</view>
		</view>
		
		<!-- 统计信息区域 -->
		<view class="stats-section">
			<view class="stat-item">
				<text class="stat-number">24</text>
				<text class="stat-label">小时响应</text>
			</view>
			<view class="stat-item">
				<text class="stat-number">98%</text>
				<text class="stat-label">满意度</text>
			</view>
			<view class="stat-item">
				<text class="stat-number">1000+</text>
				<text class="stat-label">已解决</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			goToCreateTicket() {
				uni.navigateTo({
					url: '/pages/customer/create-ticket/create-ticket'
				});
			},
			goToMyTickets() {
				uni.navigateTo({
					url: '/pages/customer/my-tickets/my-tickets'
				});
			},
			contactService() {
				uni.showToast({
					title: '联系客服功能',
					icon: 'none'
				});
			},
			viewFAQ() {
				uni.showToast({
					title: '查看常见问题',
					icon: 'none'
				});
			},
			serviceGuide() {
				uni.showToast({
					title: '查看服务指南',
					icon: 'none'
				});
			},
			feedback() {
				uni.showToast({
					title: '意见反馈',
					icon: 'none'
				});
			}
		}
	}
</script>

<style scoped>
	.client-home {
		padding: 20rpx;
		background: linear-gradient(to bottom, #f5f7fa, #e4edf9);
		min-height: 100vh;
	}
	
	/* 顶部欢迎区域样式 */
	.header-section {
		background: linear-gradient(135deg, #007AFF, #00d4ff);
		border-radius: 20rpx;
		padding: 60rpx 40rpx;
		margin-bottom: 40rpx;
		box-shadow: 0 10rpx 30rpx rgba(0, 122, 255, 0.2);
		text-align: center;
		color: white;
	}
	
	.welcome-text {
		font-size: 36rpx;
		font-weight: bold;
		margin-bottom: 15rpx;
		display: block;
	}
	
	.subtitle {
		font-size: 28rpx;
		opacity: 0.9;
	}
	
	/* 核心功能卡片样式 */
	.features-section {
		margin-bottom: 40rpx;
	}
	
	.feature-card {
		background: white;
		border-radius: 20rpx;
		padding: 30rpx;
		margin-bottom: 20rpx;
		display: flex;
		align-items: center;
		box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
		transition: all 0.3s ease;
	}
	
	.feature-card:active {
		transform: translateY(-5rpx);
		box-shadow: 0 12rpx 25rpx rgba(0, 0, 0, 0.1);
	}
	
	.card-icon {
		width: 100rpx;
		height: 100rpx;
		border-radius: 18rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-right: 30rpx;
	}
	
	.card-icon.primary {
		background: linear-gradient(135deg, #007AFF, #00d4ff);
	}
	
	.card-icon.secondary {
		background: linear-gradient(135deg, #5ac8fa, #5856d6);
	}
	
	.icon {
		font-size: 50rpx;
		color: white;
	}
	
	.card-content {
		flex: 1;
	}
	
	.card-title {
		font-size: 32rpx;
		font-weight: bold;
		color: #333;
		display: block;
		margin-bottom: 10rpx;
	}
	
	.card-desc {
		font-size: 26rpx;
		color: #888;
	}
	
	.card-arrow {
		width: 60rpx;
		text-align: center;
	}
	
	.arrow {
		font-size: 50rpx;
		color: #ccc;
	}
	
	/* 快捷操作区域样式 */
	.section-title {
		font-size: 32rpx;
		font-weight: bold;
		color: #333;
		margin-bottom: 30rpx;
		padding-left: 10rpx;
	}
	
	.actions-grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	}
	
	.action-item {
		width: 23%;
		background: white;
		border-radius: 16rpx;
		padding: 30rpx 0;
		text-align: center;
		box-shadow: 0 6rpx 15rpx rgba(0, 0, 0, 0.05);
		margin-bottom: 20rpx;
		transition: all 0.3s ease;
	}
	
	.action-item:active {
		transform: translateY(-5rpx);
		box-shadow: 0 12rpx 20rpx rgba(0, 0, 0, 0.1);
	}
	
	.action-icon {
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
		background: #f0f8ff;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0 auto 20rpx;
	}
	
	.action-icon .icon {
		font-size: 40rpx;
		color: #007AFF;
	}
	
	.action-text {
		font-size: 24rpx;
		color: #666;
	}
	
	/* 统计信息区域样式 */
	.stats-section {
		background: white;
		border-radius: 20rpx;
		padding: 40rpx 20rpx;
		display: flex;
		justify-content: space-around;
		box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
		margin-top: 20rpx;
	}
	
	.stat-item {
		text-align: center;
	}
	
	.stat-number {
		font-size: 36rpx;
		font-weight: bold;
		color: #007AFF;
		display: block;
		margin-bottom: 10rpx;
	}
	
	.stat-label {
		font-size: 24rpx;
		color: #888;
	}
	
	/* 响应式设计 */
	@media screen and (max-width: 768px) {
		.action-item {
			width: 48%;
		}
	}
</style>